package com.wj.domain.dto;

import com.wj.tool.utils.TimeUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @description:
 * @author: wj
 * @create: 2022/5/11 16:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BookDTO implements Serializable {

    private static final long serialVersionUID=1L;

    private Long id;

    private String bookName;

    private Timestamp createTime;

    private String author;

    private Integer type;

    private String newest;

    private String state;

    private int views; //访问量

    private Integer number;

    private String bookDesc;

    private String imgUrl;

    private String bookUrl;

    public BookDTO(String bookUrl, String imgUrl, String bookDesc, String bookName, String author, Integer type, String newest, String state, Integer number) {
        this.bookName = bookName;
        this.createTime = TimeUtil.getTimestamp();
        this.author = author;
        this.type = type;
        this.imgUrl = imgUrl;
        this.newest = newest;
        this.state = state;
        this.bookDesc = bookDesc;
        this.number = number;
        this.bookUrl = bookUrl;
    }
}
